#pragma once
#include <map>
#include <vector>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <memory>
#include "PurchaseRedemptionList.hpp"


namespace StockMarket
{
    class ETF;
    class Stock
    {
    private:
        int m_stock_code;
        int m_old_price = -1;
        std::vector<std::weak_ptr<ETF>> m_etfs;

    public:
        Stock() = delete;
        Stock(int stock_code, int price) : m_stock_code(stock_code), m_old_price(price) {}
        ~Stock() {}
        void updatePrice(const int new_price);
        int getPrice() const;
        void addETF(std::weak_ptr<ETF> etf);
    };

} // namespace StockMarket
